package jm.java.bytecode;

import java.lang.reflect.Method;

/**
 * @Description 反射优化
 * @date 2022/3/29 21:15
 */
public class ReflectOptimize {
    public static void foo(){
        System.out.println("foo...");
    }

    public static void main(String[] args) throws Exception {
        Method foo = ReflectOptimize.class.getMethod("foo");
        for (int i = 0; i <= 16; i++) {
            System.out.printf("%d\t", i);
            foo.invoke(null);
        }
        System.in.read();
    }
}
